<%@ page language="java" pageEncoding="ISO-8859-1" import="java.util.*"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>ViewPolicestation.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body bgcolor="pink">
  <%
		
		    HttpSession hs=request.getSession(true);
		    
		    ArrayList<String> ar1=(ArrayList<String>)hs.getAttribute("PI");
		    ArrayList<String> ar2=(ArrayList<String>)hs.getAttribute("PD");
		    ArrayList<String> ar3=(ArrayList<String>)hs.getAttribute("PH");
		    ArrayList<String> ar4=(ArrayList<String>)hs.getAttribute("ED");
		   
		 
		     if(ar1 !=null)
		     {
		 
		  %>
   <div align="center">
	<table border="1" width="100%">
		<tr>
			<td bgcolor="cyan" ><font color="green">Police Station ID( Click on the id)</font></td>
			<td bgcolor="cyan"><font color="green">Police Station Name</font></td>
			<td bgcolor="cyan"><font color="green">Police Station Headquarter</font></td>
			<td bgcolor="cyan"><font color="green">Effect Date</font></td>
			
			
		</tr>
		<%
		  
		    	  
		    	  
		    	  for(int i=0;i<ar1.size();i++)
		    	  {
		    	  
		    	%>
		    	 
		   
	    
		 <tr>
		    
			<td><a href="<%=request.getContextPath()%>/apsa.do?apsp=showpolicestation&pi=<%=ar1.get(i).toString()%>"><%=ar1.get(i).toString()%></a></td>
			<td><%=ar2.get(i).toString() %></td>
			<td><%=ar3.get(i).toString() %></td>
			<td><%=ar4.get(i).toString() %></td>
			
		</tr>
		<%
		
		}}
		
		 %>
	</table>
</div>
  </body>
</html:html>
